CREATE TABLE `SRTrade`.`MsgSRSweepDetail` (
`parentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`engineName` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'SpiderRock execution engine that handled the parent order',
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`riskGroupId` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`triggerGroupId` BIGINT NOT NULL DEFAULT 0 COMMENT 'WaitTrigger group Id',
`secKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`secKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`secKey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`secKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_xx` DOUBLE NOT NULL DEFAULT 0,
`secKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`secType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`parentOrderSize` INT NOT NULL DEFAULT 0,
`parentLimitPrice` DOUBLE NOT NULL DEFAULT 0,
`orderSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`isISOSweep` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`riskLimitSize` INT NOT NULL DEFAULT 0,
`riskLimitReason` ENUM('None','NullCounter','StkClsOnly','StkDisabled','FutClsOnly','FutDisabled','OptClsOnly','OptDisabled','OrderMargin','AccMargin','DayMargin','OpenExpose','DayLnDDelta','DayShDDelta','DayAbsDDelta','DayLnWtVe','DayShWtVe','DayAbsWtVe','DayLnNValue','DayShNValue','DayAbsNValue','StkImpact','FutImpact','OptImpact','NullMRC','NullSRC','DDeltaLn','DDeltaSh','DDeltaAbs','WtVegaLn','WtVegaSh','WtVegaAbs','NValueLn','NValueSh','NValueAbs','CtrlDisable','AccEmaDdLn','AccEmaDdSh','AccEmaWvLn','AccEmaWvSh','SymEmaDdLn','SymEmaDdSh','SymEmaWvLn','SymEmaWvSh','ExpDDeltaLn','ExpDDeltaSh','ExpWtVegaLn','ExpWtVegaSh','ExpRm6Ln','ExpRm6Sh','SymDDeltaLn','SymDDeltaSh','SymVegaLn','SymVegaSh','SymWtVegaLn','SymWtVegaSh','SymRm7Ln','SymRm7Sh','GrpDdLn','GrpDdSh','GrpOptQtyLn','GrpOptQtySh','GrpOptQtyAbs','GrpVegaLn','GrpVegaSh','GrpVegaAbs','GrpRm1Ln','GrpRm1Sh','GrpRm1Abs','GrpRm2Ln','GrpRm2Sh','GrpRm3Ln','GrpRm3Sh','GrpRm4Ln','GrpRm4Sh','GrpRm5Ln','GrpRm5Sh','UDn50','UUp50','UDn15','UUp15','OrderSize','SysErr','StkErr','FutErr','OptErr','SSaleErr','SSaleRstr','StkSellLmt','Locate','StkRstct','SizeCap','ZeroCross','PreOpnQ','TrgWait','WaitStart','WaitTrigger','LegStep','TwapStep','MktNotReady','MaxRisk','NoStkBrw','BadMkt','BadLmt','NoAltOrdId','InvldBrkr','MaxChildOrders','MktHalted','UPrcErr','MinUBid','MaxUAsk','PreStart','ClntRteDn','ActiveSize','MktClosed','NoDDeltaMult','InvldDelta','RiskCollarRng','DayFutCnBot','DayFutCnSld','DayFutCnAbs','AccFutCnAbs') NOT NULL DEFAULT 'None',
`riskLimitDetail` TINYTEXT NOT NULL DEFAULT '',
`nbboBid1` DOUBLE NOT NULL DEFAULT 0,
`nbboAsk1` DOUBLE NOT NULL DEFAULT 0,
`nbboBidSize1` INT NOT NULL DEFAULT 0,
`nbboAskSize1` INT NOT NULL DEFAULT 0,
`nbboBidCnt1` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`nbboAskCnt1` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`nbboBidMask1` INT UNSIGNED NOT NULL DEFAULT 0,
`nbboAskMask1` INT UNSIGNED NOT NULL DEFAULT 0,
`nbboBid2` DOUBLE NOT NULL DEFAULT 0,
`nbboAsk2` DOUBLE NOT NULL DEFAULT 0,
`nbboBidSize2` INT NOT NULL DEFAULT 0,
`nbboAskSize2` INT NOT NULL DEFAULT 0,
`nbboBidCnt2` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`nbboAskCnt2` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`nbboBidMask2` INT UNSIGNED NOT NULL DEFAULT 0,
`nbboAskMask2` INT UNSIGNED NOT NULL DEFAULT 0,
`netTimestamp` BIGINT NOT NULL DEFAULT 0,
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
CONSTRAINT nonnegative_parentNumber CHECK(ASCII(parentNumber) < 56),
CONSTRAINT nonnegative_riskGroupId CHECK(ASCII(riskGroupId) < 56),
PRIMARY KEY USING HASH (`parentNumber`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SpdrSweepDetail records are published by execution engines when sweep trigger groups are processed';